<div *ngIf="flag">
  123123
</div>
<div *ngIf="!flag">
  0090909
</div>

<div [ngSwitch]="status">
  <div *ngSwitchCase="-1">
    -1
  </div>
  <div *ngSwitchCase="0">
    00000
  </div>
  <div *ngSwitchCase="1">
    11111
  </div>
  <div *ngSwitchDefault>
    9-09-0
  </div>
</div>

<div [ngClass]="{'red':false,'blue':true}">ng-class</div>
<div [ngClass]="{'red':colorFlag,'orange':!colorFlag}">ng-class</div>


<ul>
  <li
    *ngFor="let item of arrA;let key=index;"
    [ngClass]="{'red':key==0,'blue':key==1,'orange':key==2}">
    {{item}}
  </li>
</ul>


<p [ngStyle]="{'color':'red'}">我是一个P标签</p>
<p [ngStyle]="{'color':styleColor}">我是一个P标签</p>
<!--管道-->
<span>{{time | date:'yyyy-MM-dd'}}</span>

<br/>
<div>{{mydata}}</div>
<br/>
<button (click)="run($event)">点击事件</button>
<button (click)="setData()">设置属性值</button>
<br/>

<input type="text" (keydown)="keyDown()"><br/>
<input type="text" (keydown)="keyDown2($event)">

<!--双向数据绑定 MVVM-->
<input type="text" [(ngModel)]="modedata"/>
<div>{{modedata}}</div>

